<template>
    <el-row>
        <el-col 
            :span="tool.span || $attrs.span" 
            :offset="tool.offset || $attrs.offset || 0" 
            v-bind="$attrs"  
            v-for="(tool, index) in columns" 
            :key="index"
            >
            <component 
                :is="tool.el" 
                :option="tool.option"
                />
        </el-col>
    </el-row>
</template>
<script>
import ivButton from './ivButton'
import ivUploadBtn from './ivUploadBtn'
import ivSpan from './ivSpan'
export default {
    name: 'iv-toolbar',
    components: {
        ivButton,
        ivUploadBtn,
        ivSpan
    },
    props: {
        columns: {
            type: Array,
            default: () => []
        }
    }
}
</script>
